﻿using Iworld.basis.Service;
using Iworld.Game.Manager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Iworld.Game.Service.Backstage.Import
{
    [DataContract]
    public class EditSettingOfGameImport : CheckAdministratorImportBase
    {

        public override void CheckAllowExecuteOrNot(Main.Impl.ModelToDbContext db)
        {
            base.CheckAllowExecuteOrNot(db);
            if (!Self.Group.CanEditGameSetting)
            {
                throw new Exception("你无权修改游戏设置");
            }

        }

        /// <summary>
        /// 每轮的局数,默认100局
        /// </summary>
        [DataMember]
        public int EachChapterRoundCount
        {
            set;
            get;
        }

        /// <summary>
        /// 每局游戏间隔时间(秒),默认40秒
        /// </summary>
        [DataMember]
        public int EachRoundTimeSpan
        {
            set;
            get;
        }

        /// <summary>
        /// 每轮游戏间隔时间(秒),默认2分钟
        /// </summary>
        [DataMember]
        public int EachChapterTimeSpan
        {
            set;
            get;
        }

        /// <summary>
        /// 限红分数
        /// </summary>
        [DataMember]
        public double LimitRedGolds
        {
            set;
            get;
        }

        /// <summary>
        /// 封单时间（秒）
        /// </summary>
        [DataMember]
        public int ClosureSingleTime
        {
            set;
            get;
        }
    }
}
